package com.xzx.springboot_redis.controller;

import com.xzx.springboot_redis.entity.ApiAccount;
import com.xzx.springboot_redis.service.ApiAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api_account")
public class ApiAccountController {
    @Autowired
    private ApiAccountService apiAccountService;
    //注册
    @PostMapping("register")
    public void register(@RequestBody ApiAccount account){
        System.out.println(account);
        apiAccountService.addApiAccount(account);
    }
}
